﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
    public interface IBiProductService
    {

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="data">实体</param>
        /// <returns>结果</returns>
        Task<int> CreateAsync(BiProduct data);

        /// <summary>
        /// 根据ID查询
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>用户列表</returns>
        Task<BiProduct> GetByIdAsync(long Id);
        /// <summary>
        /// 根据编号查询
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>用户列表</returns>
        Task<BiProduct> GetByCodeAsync(string id);
        /// <summary>
        /// 根据ID查询类型
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>用户列表</returns>
        Task<GoodsType> GetByTypeIdAsync(long Id);

        /// <summary>
        /// 查询所有
        /// </summary>
        /// <returns>用户列表</returns>
        Task<List<BiProduct>> GetAllAsync();

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="date">包含更新信息</param>
        Task<int> UpdateAsync(BiProduct date);

        /// <summary>
        /// 根据id获取客户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<BiCustomer> GetBiCustomersId(long id);
        /// <summary>
        /// 根据id获取供应商
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<BiSupplier> GetBiSuppliersId(long id);
        /// <summary>
        /// 根据ID删除
        /// </summary>
        /// <param name="Id">ID</param>
        Task<int> DeleteAsync(long Id);
        /// <summary>
        /// 获取所有货品
        /// </summary>
        /// <returns></returns>
        Task<List<BiProductDetailDTO>> GetAllWithDetailsAsync();
        /// <summary>
        /// 根据ID获取所有货品信息（优化版）
        /// </summary>
        Task<List<BiProductDetailDTO>> GetAllWithDetailsIdAsync(long id);
        /// <summary>
        /// 添加获取所有仓库及库位的方法
        /// </summary>
        /// <returns></returns>
        Task<List<WarehouseWithLocationsDTO>> GetAllWithLocationsAsync();
        /// <summary>
        /// 库存查询方法，关联库位信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<WhInventoryDa>> GetInventoryByGoodsId(long id);
        /// <summary>
        /// 启用停用状态变更
        /// </summary>
        /// <param name="status"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> Status(string status, long id);
    }
}
